﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MDM.GUI.MDM.DataObjects;
using System.Collections;
using System.Xml;
using System.Windows.Forms;

namespace MDM.GUI.MDM.DataAccess
{
    class UserIO
    {
        // public static LoadUser(){
        public static void  LoadUser()
        {
            //tao bang hash chua 1 key va 1 value
            //gom ten user:Name va pass:Password
        //    Hashtable UserList = new Hashtable();
           
            XmlDataDocument doc = new XmlDataDocument();
            UserInfor itemUser;
            doc.Load(Application.StartupPath + "//Login.xml");
            foreach (XmlNode item in doc.GetElementsByTagName("User"))
            {
                itemUser = new UserInfor(item.Attributes ["Name"].Value , item.Attributes ["Password"].Value );
                //UserList.Add(item.Attributes["Name"].Value, item.Attributes["Password"].Value);
                Common.aUserInfor.Add(itemUser);
            }
           // return UserList;
        }
    }

}

